import 'mui-player/dist/mui-player.min.css'
import MuiPlayer from 'mui-player'

import playerConfig from './js/config'
import globals from './js/global'
import { listener } from './js/playerListener'
import Hls from 'hls.js'

window.onload = () => {
    playerConfig.container = document.getElementById("mui-player");
    // playerConfig.src = 'https://muiplayer.js.org/media/media.m3u8';
    playerConfig.src = 'http://192.168.1.29/live/01/01.m3u8';
    playerConfig.parse = {
        type:'hls',
        loader:Hls,
        config:{
            debug:false,
        },
    }
    let muiplayer = new MuiPlayer(playerConfig);
    globals.mp = muiplayer;
    console.log(playerConfig);
    listener();
}